<template>
	<image class="imgcont" :src="src" @error="imgLoadError" :mode="mode"></image>
</template>
<script>
    export default {
        name: "imgitem",
        props: {
            src:{
                type: String,
                default: '/static/image/activity/none.png',
            }
        },
        data() {
            return {
                show: true,
				mode:'aspectFill'
            }
        },
		computed:{
			pic(){
				setTimeout(()=>{
					if(this.src) return
					this.mode = 'center'
				},0)
			}
		},
        methods: {
            imgLoadError() {
                this.src = '';
            },
        },
    }


</script>
<style>
	.imgcont{
		display: block;
		background-color: #EBEBEB;
		width:100%;
		height:100%;
	}
</style>